package com.itheima.dao;

import com.itheima.domain.User;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Select;
import org.springframework.stereotype.Repository;

import java.util.List;

@Repository
public interface UserDao {

    @Insert("INSERT INTO USER  VALUES(#{id},#{user},#{pwd},#{date_time})")
    void  insertUser(User user);
    @Select("select * from user where user=#{username}")
    User  findByUsername(String username);

    @Select("select * from user")
    List<User> findAll();

}
